---@class TargetAreaCenterType
TargetAreaCenterType = ClientFight.CreateClass("TargetAreaCenterType")
function TargetAreaCenterType:ctor(id,name)
    self.id = id
    self.name = name.."["..id.."]"
end
local map = {}
function TargetAreaCenterType:valueOf(id)
    return map[id]
end
---@return TargetAreaCenterType
local function ADD_VALUE(type,id,name)
    local e = TargetAreaCenterType.New(id,name)
    map[e.id] = e
    TargetAreaCenterType[type] = e
    return e
end
function TargetAreaCenterType:action(skill)
end
local t = ADD_VALUE("type1",1,"自身为中心")
---@param skill FightUsingSkill
function t:action(skill)
    return skill.fighter.position
end
t = ADD_VALUE("type2",2,"目标为中心")
---@param skill FightUsingSkill
function t:action(skill)
    return skill.target.position
end
t = ADD_VALUE("type3",3,"自身前为中心")
---@param skill FightUsingSkill
function t:action(skill)
    local fighter = skill.fighter
    return Vector2(fighter.position.x + skill.targetDirection * skill.skill.damageShape.length / 2, fighter.position.y);
end
t = ADD_VALUE("type4",4,"技能为中心")
---@param skill FightUsingSkill
function t:action(skill)
    return skill.position
end
t = ADD_VALUE("type5",5,"目标后为中心")
---@param skill FightUsingSkill
function t:action(skill)
    return FighterUtils.getBackCenter(skill.target, skill.skill.damageShape);
end
t = ADD_VALUE("type6",6,"自身后为中心")
---@param skill FightUsingSkill
function t:action(skill)
    return FighterUtils.getBackCenter(skill.fighter, skill.skill.damageShape);
end
t = ADD_VALUE("type7",7,"技能起手时, 目标所在位置为中心")
---@param skill FightUsingSkill
function t:action(skill)
    local position = skill.originalTargetPlacePosition
    if (position == nil) then
        position = skill.target.position
    end
    return position;
end
t = ADD_VALUE("type8",8,"技能首次结算时, 目标所在位置为中心")
---@param skill FightUsingSkill
function t:action(skill)
    local position = skill.firstEffectPlacePosition
    if (position == nil) then
        position = skill.target.position
    end
    return position;
end